// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import iView from 'iview'
import iEditor from 'iview-editor'
import VueParticles from 'vue-particles'
// 全量引入ElementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'iview/dist/styles/iview.css'
import 'iview-editor/dist/iview-editor.css'
import './common/css/reset.css'
// 封装Axios
import {
  deleteRequest,
  getRequest,
  multipleRequest,
  postJSON,
  postQuery,
  postRequest,
  putRequest
} from './common/js/http'
import urlApi from './common/js/url';

Vue.use(iView);
Vue.use(iEditor);
Vue.use(VueParticles);
Vue.use(ElementUI);

Vue.prototype.getRequest = getRequest;
Vue.prototype.postRequest = postRequest;
Vue.prototype.multipleRequest = multipleRequest;
Vue.prototype.postJSON = postJSON;
Vue.prototype.postQuery = postQuery;
Vue.prototype.putRequest = putRequest;
Vue.prototype.deleteRequest = deleteRequest;
Vue.prototype.$urlApi = urlApi;

Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {App},
  template: '<App/>'
});
